<template>
    <div>
        <titleNav></titleNav>
        <detailsMain :select="$route.query.select" :id="$route.query.id"></detailsMain>
        <footerBox></footerBox>
    </div>
</template>

<script>
    import detailsMain from "./detailsMain";
    import titleNav from "../../components/titleNav";
    import footerBox from "../../components/footerBox";
    export default {
        name: "detailsForNews",
        components:{
            detailsMain,
            titleNav,
            footerBox
        },
        created() {
            switch (this.$route.query.select) {
                case '公司新闻':
                    this.$store.commit('changePage', 4)
                    break;
                case '星火项目':
                    this.$store.commit('changePage', 3)
                    break;
                case '星火动态':
                    this.$store.commit('changePage', 3)
                    break;
                case '产品详情':
                    this.$store.commit('changePage', 2)
                    break;
            }


        }
        // props :{
        //     id:String
        // }
    }
</script>

<style scoped>

</style>